package com.test.dataSource.config;

public class DataSourceHolder {
    private static final ThreadLocal<String> contextHolder = new ThreadLocal();

    public DataSourceHolder() {
    }

    public static void setDataSourceKey(String dataSourceKey) {
        contextHolder.set(dataSourceKey);
    }

    public static String getDataSourceKey() {
        return (String)contextHolder.get();
    }

    public static void clearDataSourceKey() {
        contextHolder.remove();
    }
}
